package edu.suda.xsap.dto.convert;
import edu.suda.xsap.dto.CustomerStatsDto;
import edu.suda.xsap.entity.CustomerStats;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface CustomerStatsConvert {
    @Mapping(source="year", target = "year")
    @Mapping(source="month", target = "month")
    @Mapping(source="quarter", target = "quarter")
    @Mapping(source="day", target = "day")
    @Mapping(source="count", target = "count")

    CustomerStatsDto toDto(CustomerStats customerStats);
    List<CustomerStatsDto> toDtoList(List<CustomerStats> customerStats);

}
